package com.tw.trips.dao;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.data.neo4j.support.Neo4jTemplate;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.transaction.annotation.Transactional;

import com.tw.trips.domain.Location;
import com.tw.trips.domain.Traveller;
import com.tw.trips.repository.TravellerRepository;

@Repository
public class SampleDAO {

	@Autowired
	private Neo4jTemplate template;

	@Autowired
	private TravellerRepository repo;

	@Transactional
	public void tstStore() {
		Traveller trvlr = new Traveller("testEmail");
		Location loc = new Location("Chennai");
		trvlr.getFavLocations().add(loc);
		System.out.println(trvlr);
		Traveller actual = template.findOne(1, Traveller.class);
		System.out.println(actual);
	}
}
